package ua.epam.java_bravo.data.dto.pk;

import java.io.Serializable;

/**
 * This class represents the primary key of the HS_Renter table.
 */
public class HsRenterPk implements Serializable {
    protected int renterId;

    /**
     * This attribute represents whether the primitive attribute renterId is null.
     */
    protected boolean renterIdNull;

    /**
     * Sets the value of renterId
     */
    public void setRenterId(int renterId) {
        this.renterId = renterId;
    }

    /**
     * Gets the value of renterId
     */
    public int getRenterId() {
        return renterId;
    }

    /**
     * Method 'HsRenterPk'
     */
    public HsRenterPk() {
    }

    /**
     * Method 'HsRenterPk'
     *
     * @param renterId
     */
    public HsRenterPk(final int renterId) {
        this.renterId = renterId;
    }

    /**
     * Sets the value of renterIdNull
     */
    public void setRenterIdNull(boolean renterIdNull) {
        this.renterIdNull = renterIdNull;
    }

    /**
     * Gets the value of renterIdNull
     */
    public boolean isRenterIdNull() {
        return renterIdNull;
    }

    /**
     * Method 'equals'
     *
     * @param _other
     * @return boolean
     */
    public boolean equals(Object _other) {
        if (_other == null) {
            return false;
        }

        if (_other == this) {
            return true;
        }

        if (!(_other instanceof HsRenterPk)) {
            return false;
        }

        final HsRenterPk _cast = (HsRenterPk) _other;
        if (renterId != _cast.renterId) {
            return false;
        }

        if (renterIdNull != _cast.renterIdNull) {
            return false;
        }

        return true;
    }

    /**
     * Method 'hashCode'
     *
     * @return int
     */
    public int hashCode() {
        int _hashCode = 0;
        _hashCode = 29 * _hashCode + renterId;
        _hashCode = 29 * _hashCode + (renterIdNull ? 1 : 0);
        return _hashCode;
    }

    /**
     * Method 'toString'
     *
     * @return String
     */
    public String toString() {
        StringBuffer ret = new StringBuffer();
        ret.append("ua.epam.java_bravo.data.dto.pk.HsRenterPk: ");
        ret.append("renterId=" + renterId);
        return ret.toString();
    }

}
